package resp

type UnknowErrReply struct {
}

var unknowErrReply = []byte("-Err unknown\r\n")

func (u UnknowErrReply) ToBytes() []byte {
	return unknowErrReply
}

func (u UnknowErrReply) Error() string {
	return "Err unknown"
}

// ArgNumErrReply 参数异常错误
type ArgNumErrReply struct {
	Cmd string
}

func (r *ArgNumErrReply) ToBytes() []byte {
	return []byte("-ERR wrong number of arguments for '" + r.Cmd + "' command\r\n")
}

func (r *ArgNumErrReply) Error() string {
	return "-ERR wrong number of arguments for '" + r.Cmd + "' command\r\n"
}
func MakeArgNumErrReply(cmd string) *ArgNumErrReply {
	return &ArgNumErrReply{Cmd: cmd}
}
